home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc A) / Acorn User China CD-ROM (UK) (Disc A).bin / DEMON / GNU / FLEX252_.ARC / c_skel < prev    next >
Encoding:
Text File  |  1995-04-24  |  40.0 KB  |  1,517 lines

  1. /* File created from flex.skl via mkskel.sh */
  2.  
  3. #include "flexdef.h"
  4.  
  5. const char *skel[] = {
  6.   "/* A lexical scanner generated by flex */",
  7.   "",
  8.   "/* Scanner skeleton version:",
  9.   " * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $",
  10.   " */",
  11.   "",
  12.   "#define FLEX_SCANNER",
  13.   "#define YY_FLEX_MAJOR_VERSION 2",
  14.   "#define YY_FLEX_MINOR_VERSION 5",
  15.   "",
  16.   "%-",
  17.   "#include <stdio.h>",
  18.   "%*",
  19.   "",
  20.   "",
  21.   "/* cfront 1.2 defines \"c_plusplus\" instead of \"__cplusplus\" */",
  22.   "#ifdef c_plusplus",
  23.   "#ifndef __cplusplus",
  24.   "#define __cplusplus",
  25.   "#endif",
  26.   "#endif",
  27.   "",
  28.   "",
  29.   "#ifdef __cplusplus",
  30.   "",
  31.   "#include <stdlib.h>",
  32.   "%+",
  33.   "class istream;",
  34.   "%*",
  35.   "#include <unistd.h>",
  36.   "",
  37.   "/* Use prototypes in function declarations. */",
  38.   "#define YY_USE_PROTOS",
  39.   "",
  40.   "/* The \"const\" storage-class-modifier is valid. */",
  41.   "#define YY_USE_CONST",
  42.   "",
  43.   "#else    /* ! __cplusplus */",
  44.   "",
  45.   "#if __STDC__",
  46.   "",
  47.   "#define YY_USE_PROTOS",
  48.   "#define YY_USE_CONST",
  49.   "",
  50.   "#endif    /* __STDC__ */",
  51.   "#endif    /* ! __cplusplus */",
  52.   "",
  53.   "#ifdef __TURBOC__",
  54.   " #pragma warn -rch",
  55.   " #pragma warn -use",
  56.   "#include <io.h>",
  57.   "#include <stdlib.h>",
  58.   "#define YY_USE_CONST",
  59.   "#define YY_USE_PROTOS",
  60.   "#endif",
  61.   "",
  62.   "#ifdef YY_USE_CONST",
  63.   "#define yyconst const",
  64.   "#else",
  65.   "#define yyconst",
  66.   "#endif",
  67.   "",
  68.   "",
  69.   "#ifdef YY_USE_PROTOS",
  70.   "#define YY_PROTO(proto) proto",
  71.   "#else",
  72.   "#define YY_PROTO(proto) ()",
  73.   "#endif",
  74.   "",
  75.   "/* Returned upon end-of-file. */",
  76.   "#define YY_NULL 0",
  77.   "",
  78.   "/* Promotes a possibly negative, possibly signed char to an unsigned",
  79.   " * integer for use as an array index.  If the signed char is negative,",
  80.   " * we want to instead treat it as an 8-bit unsigned char, hence the",
  81.   " * double cast.",
  82.   " */",
  83.   "#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)",
  84.   "",
  85.   "/* Enter a start condition.  This macro really ought to take a parameter,",
  86.   " * but we do it the disgusting crufty way forced on us by the ()-less",
  87.   " * definition of BEGIN.",
  88.   " */",
  89.   "#define BEGIN yy_start = 1 + 2 *",
  90.   "",
  91.   "/* Translate the current start state into a value that can be later handed",
  92.   " * to BEGIN to return to the state.  The YYSTATE alias is for lex",
  93.   " * compatibility.",
  94.   " */",
  95.   "#define YY_START ((yy_start - 1) / 2)",
  96.   "#define YYSTATE YY_START",
  97.   "",
  98.   "/* Action number for EOF rule of a given start state. */",
  99.   "#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)",
  100.   "",
  101.   "/* Special action meaning \"start processing a new file\". */",
  102.   "#define YY_NEW_FILE yyrestart( yyin )",
  103.   "",
  104.   "#define YY_END_OF_BUFFER_CHAR 0",
  105.   "",
  106.   "/* Size of default input buffer. */",
  107.   "#define YY_BUF_SIZE 16384",
  108.   "",
  109.   "typedef struct yy_buffer_state *YY_BUFFER_STATE;",
  110.   "",
  111.   "extern int yyleng;",
  112.   "%-",
  113.   "extern FILE *yyin, *yyout;",
  114.   "%*",
  115.   "",
  116.   "#define EOB_ACT_CONTINUE_SCAN 0",
  117.   "#define EOB_ACT_END_OF_FILE 1",
  118.   "#define EOB_ACT_LAST_MATCH 2",
  119.   "",
  120.   "/* The funky do-while in the following #define is used to turn the definition",
  121.   " * int a single C statement (which needs a semi-colon terminator).  This",
  122.   " * avoids problems with code like:",
  123.   " *",
  124.   " *     if ( condition_holds )",
  125.   " *        yyless( 5 );",
  126.   " *    else",
  127.   " *        do_something_else();",
  128.   " *",
  129.   " * Prior to using the do-while the compiler would get upset at the",
  130.   " * \"else\" because it interpreted the \"if\" statement as being all",
  131.   " * done when it reached the ';' after the yyless() call.",
  132.   " */",
  133.   "",
  134.   "/* Return all but the first 'n' matched characters back to the input stream. */",
  135.   "",
  136.   "#define yyless(n) \\",
  137.   "    do \\",
  138.   "        { \\",
  139.   "        /* Undo effects of setting up yytext. */ \\",
  140.   "        *yy_cp = yy_hold_char; \\",
  141.   "        yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \\",
  142.   "        YY_DO_BEFORE_ACTION; /* set up yytext again */ \\",
  143.   "        } \\",
  144.   "    while ( 0 )",
  145.   "",
  146.   "#define unput(c) yyunput( c, yytext_ptr )",
  147.   "",
  148.   "/* The following is because we cannot portably get our hands on size_t",
  149.   " * (without autoconf's help, which isn't available because we want",
  150.   " * flex-generated scanners to compile on their own).",
  151.   " */",
  152.   "typedef unsigned int yy_size_t;",
  153.   "",
  154.   "",
  155.   "struct yy_buffer_state",
  156.   "    {",
  157.   "%-",
  158.   "    FILE *yy_input_file;",
  159.   "%+",
  160.   "    istream* yy_input_file;",
  161.   "%*",
  162.   "",
  163.   "    char *yy_ch_buf;        /* input buffer */",
  164.   "    char *yy_buf_pos;        /* current position in input buffer */",
  165.   "",
  166.   "    /* Size of input buffer in bytes, not including room for EOB",
  167.   "     * characters.",
  168.   "     */",
  169.   "    yy_size_t yy_buf_size;",
  170.   "",
  171.   "    /* Number of characters read into yy_ch_buf, not including EOB",
  172.   "     * characters.",
  173.   "     */",
  174.   "    int yy_n_chars;",
  175.   "",
  176.   "    /* Whether we \"own\" the buffer - i.e., we know we created it,",
  177.   "     * and can realloc() it to grow it, and should free() it to",
  178.   "     * delete it.",
  179.   "     */",
  180.   "    int yy_is_our_buffer;",
  181.   "",
  182.   "    /* Whether this is an \"interactive\" input source; if so, and",
  183.   "     * if we're using stdio for input, then we want to use getc()",
  184.   "     * instead of fread(), to make sure we stop fetching input after",
  185.   "     * each newline.",
  186.   "     */",
  187.   "    int yy_is_interactive;",
  188.   "",
  189.   "    /* Whether we're considered to be at the beginning of a line.",
  190.   "     * If so, '^' rules will be active on the next match, otherwise",
  191.   "     * not.",
  192.   "     */",
  193.   "    int yy_at_bol;",
  194.   "",
  195.   "    /* Whether to try to fill the input buffer when we reach the",
  196.   "     * end of it.",
  197.   "     */",
  198.   "    int yy_fill_buffer;",
  199.   "",
  200.   "    int yy_buffer_status;",
  201.   "#define YY_BUFFER_NEW 0",
  202.   "#define YY_BUFFER_NORMAL 1",
  203.   "    /* When an EOF's been seen but there's still some text to process",
  204.   "     * then we mark the buffer as YY_EOF_PENDING, to indicate that we",
  205.   "     * shouldn't try reading from the input source any more.  We might",
  206.   "     * still have a bunch of tokens to match, though, because of",
  207.   "     * possible backing-up.",
  208.   "     *",
  209.   "     * When we actually see the EOF, we change the status to \"new\"",
  210.   "     * (via yyrestart()), so that the user can continue scanning by",
  211.   "     * just pointing yyin at a new input file.",
  212.   "     */",
  213.   "#define YY_BUFFER_EOF_PENDING 2",
  214.   "    };",
  215.   "",
  216.   "%- Standard (non-C++) definition",
  217.   "static YY_BUFFER_STATE yy_current_buffer = 0;",
  218.   "%*",
  219.   "",
  220.   "/* We provide macros for accessing buffer states in case in the",
  221.   " * future we want to put the buffer states in a more general",
  222.   " * \"scanner state\".",
  223.   " */",
  224.   "#define YY_CURRENT_BUFFER yy_current_buffer",
  225.   "",
  226.   "",
  227.   "%- Standard (non-C++) definition",
  228.   "/* yy_hold_char holds the character lost when yytext is formed. */",
  229.   "static char yy_hold_char;",
  230.   "",
  231.   "static int yy_n_chars;        /* number of characters read into yy_ch_buf */",
  232.   "",
  233.   "",
  234.   "int yyleng;",
  235.   "",
  236.   "/* Points to current character in buffer. */",
  237.   "static char *yy_c_buf_p = (char *) 0;",
  238.   "static int yy_init = 1;        /* whether we need to initialize */",
  239.   "static int yy_start = 0;    /* start state number */",
  240.   "",
  241.   "/* Flag which is used to allow yywrap()'s to do buffer switches",
  242.   " * instead of setting up a fresh yyin.  A bit of a hack ...",
  243.   " */",
  244.   "static int yy_did_buffer_switch_on_eof;",
  245.   "",
  246.   "void yyrestart YY_PROTO(( FILE *input_file ));",
  247.   "",
  248.   "void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));",
  249.   "void yy_load_buffer_state YY_PROTO(( void ));",
  250.   "YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));",
  251.   "void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));",
  252.   "void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));",
  253.   "void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));",
  254.   "#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )",
  255.   "",
  256.   "YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));",
  257.   "YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));",
  258.   "YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));",
  259.   "%*",
  260.   "",
  261.   "static void *yy_flex_alloc YY_PROTO(( yy_size_t ));",
  262.   "static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));",
  263.   "static void yy_flex_free YY_PROTO(( void * ));",
  264.   "",
  265.   "#define yy_new_buffer yy_create_buffer",
  266.   "",
  267.   "#define yy_set_interactive(is_interactive) \\",
  268.   "    { \\",
  269.   "    if ( ! yy_current_buffer ) \\",
  270.   "        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \\",
  271.   "    yy_current_buffer->yy_is_interactive = is_interactive; \\",
  272.   "    }",
  273.   "",
  274.   "#define yy_set_bol(at_bol) \\",
  275.   "    { \\",
  276.   "    if ( ! yy_current_buffer ) \\",
  277.   "        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \\",
  278.   "    yy_current_buffer->yy_at_bol = at_bol; \\",
  279.   "    }",
  280.   "",
  281.   "#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)",
  282.   "",
  283.   "%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here",
  284.   "",
  285.   "%- Standard (non-C++) definition",
  286.   "static yy_state_type yy_get_previous_state YY_PROTO(( void ));",
  287.   "static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));",
  288.   "static int yy_get_next_buffer YY_PROTO(( void ));",
  289.   "static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));",
  290.   "%*",
  291.   "",
  292.   "/* Done after the current pattern has been matched and before the",
  293.   " * corresponding action - sets up yytext.",
  294.   " */",
  295.   "#define YY_DO_BEFORE_ACTION \\",
  296.   "    yytext_ptr = yy_bp; \\",
  297.   "%% code to fiddle yytext and yyleng for yymore() goes here",
  298.   "    yy_hold_char = *yy_cp; \\",
  299.   "    *yy_cp = '\\0'; \\",
  300.   "%% code to copy yytext_ptr to yytext[] goes here, if %array",
  301.   "    yy_c_buf_p = yy_cp;",
  302.   "",
  303.   "%% data tables for the DFA and the user's section 1 definitions go here",
  304.   "",
  305.   "/* Macros after this point can all be overridden by user definitions in",
  306.   " * section 1.",
  307.   " */",
  308.   "",
  309.   "#ifndef YY_SKIP_YYWRAP",
  310.   "#ifdef __cplusplus",
  311.   "extern \"C\" int yywrap YY_PROTO(( void ));",
  312.   "#else",
  313.   "extern int yywrap YY_PROTO(( void ));",
  314.   "#endif",
  315.   "#endif",
  316.   "",
  317.   "%-",
  318.   "#ifndef YY_NO_UNPUT",
  319.   "static void yyunput YY_PROTO(( int c, char *buf_ptr ));",
  320.   "#endif",
  321.   "%*",
  322.   "",
  323.   "#ifndef yytext_ptr",
  324.   "static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));",
  325.   "#endif",
  326.   "",
  327.   "#ifndef YY_NO_INPUT",
  328.   "%- Standard (non-C++) definition",
  329.   "#ifdef __cplusplus",
  330.   "static int yyinput YY_PROTO(( void ));",
  331.   "#else",
  332.   "static int input YY_PROTO(( void ));",
  333.   "#endif",
  334.   "%*",
  335.   "#endif",
  336.   "",
  337.   "#if YY_STACK_USED",
  338.   "static int yy_start_stack_ptr = 0;",
  339.   "static int yy_start_stack_depth = 0;",
  340.   "static int *yy_start_stack = 0;",
  341.   "#ifndef YY_NO_PUSH_STATE",
  342.   "static void yy_push_state YY_PROTO(( int new_state ));",
  343.   "#endif",
  344.   "#ifndef YY_NO_POP_STATE",
  345.   "static void yy_pop_state YY_PROTO(( void ));",
  346.   "#endif",
  347.   "#ifndef YY_NO_TOP_STATE",
  348.   "static int yy_top_state YY_PROTO(( void ));",
  349.   "#endif",
  350.   "",
  351.   "#else",
  352.   "#define YY_NO_PUSH_STATE 1",
  353.   "#define YY_NO_POP_STATE 1",
  354.   "#define YY_NO_TOP_STATE 1",
  355.   "#endif",
  356.   "",
  357.   "#ifdef YY_MALLOC_DECL",
  358.   "YY_MALLOC_DECL",
  359.   "#else",
  360.   "#if __STDC__",
  361.   "#ifndef __cplusplus",
  362.   "#include <stdlib.h>",
  363.   "#endif",
  364.   "#else",
  365.   "/* Just try to get by without declaring the routines.  This will fail",
  366.   " * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)",
  367.   " * or sizeof(void*) != sizeof(int).",
  368.   " */",
  369.   "#endif",
  370.   "#endif",
  371.   "",
  372.   "/* Amount of stuff to slurp up with each read. */",
  373.   "#ifndef YY_READ_BUF_SIZE",
  374.   "#define YY_READ_BUF_SIZE 8192",
  375.   "#endif",
  376.   "",
  377.   "/* Copy whatever the last rule matched to the standard output. */",
  378.   "",
  379.   "#ifndef ECHO",
  380.   "%- Standard (non-C++) definition",
  381.   "/* This used to be an fputs(), but since the string might contain NUL's,",
  382.   " * we now use fwrite().",
  383.   " */",
  384.   "#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )",
  385.   "%+ C++ definition",
  386.   "#define ECHO LexerOutput( yytext, yyleng )",
  387.   "%*",
  388.   "#endif",
  389.   "",
  390.   "/* Gets input and stuffs it into \"buf\".  number of characters read, or YY_NULL,",
  391.   " * is returned in \"result\".",
  392.   " */",
  393.   "#ifndef YY_INPUT",
  394.   "#define YY_INPUT(buf,result,max_size) \\",
  395.   "%% fread()/read() definition of YY_INPUT goes here unless we're doing C++",
  396.   "%+ C++ definition",
  397.   "    if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \\",
  398.   "        YY_FATAL_ERROR( \"input in flex scanner failed\" );",
  399.   "%*",
  400.   "#endif",
  401.   "",
  402.   "/* No semi-colon after return; correct usage is to write \"yyterminate();\" -",
  403.   " * we don't want an extra ';' after the \"return\" because that will cause",
  404.   " * some compilers to complain about unreachable statements.",
  405.   " */",
  406.   "#ifndef yyterminate",
  407.   "#define yyterminate() return YY_NULL",
  408.   "#endif",
  409.   "",
  410.   "/* Number of entries by which start-condition stack grows. */",
  411.   "#ifndef YY_START_STACK_INCR",
  412.   "#define YY_START_STACK_INCR 25",
  413.   "#endif",
  414.   "",
  415.   "/* Report a fatal error. */",
  416.   "#ifndef YY_FATAL_ERROR",
  417.   "%-",
  418.   "#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )",
  419.   "%+",
  420.   "#define YY_FATAL_ERROR(msg) LexerError( msg )",
  421.   "%*",
  422.   "#endif",
  423.   "",
  424.   "/* Default declaration of generated scanner - a define so the user can",
  425.   " * easily add parameters.",
  426.   " */",
  427.   "#ifndef YY_DECL",
  428.   "%- Standard (non-C++) definition",
  429.   "#define YY_DECL int yylex YY_PROTO(( void ))",
  430.   "%+ C++ definition",
  431.   "#define YY_DECL int yyFlexLexer::yylex()",
  432.   "%*",
  433.   "#endif",
  434.   "",
  435.   "/* Code executed at the beginning of each rule, after yytext and yyleng",
  436.   " * have been set up.",
  437.   " */",
  438.   "#ifndef YY_USER_ACTION",
  439.   "#define YY_USER_ACTION",
  440.   "#endif",
  441.   "",
  442.   "/* Code executed at the end of each rule. */",
  443.   "#ifndef YY_BREAK",
  444.   "#define YY_BREAK break;",
  445.   "#endif",
  446.   "",
  447.   "%% YY_RULE_SETUP definition goes here",
  448.   "",
  449.   "YY_DECL",
  450.   "    {",
  451.   "    register yy_state_type yy_current_state;",
  452.   "    register char *yy_cp, *yy_bp;",
  453.   "    register int yy_act;",
  454.   "",
  455.   "%% user's declarations go here",
  456.   "",
  457.   "    if ( yy_init )",
  458.   "        {",
  459.   "        yy_init = 0;",
  460.   "",
  461.   "#ifdef YY_USER_INIT",
  462.   "        YY_USER_INIT;",
  463.   "#endif",
  464.   "",
  465.   "        if ( ! yy_start )",
  466.   "            yy_start = 1;    /* first start state */",
  467.   "",
  468.   "        if ( ! yyin )",
  469.   "%-",
  470.   "            yyin = stdin;",
  471.   "%+",
  472.   "            yyin = &cin;",
  473.   "%*",
  474.   "",
  475.   "        if ( ! yyout )",
  476.   "%-",
  477.   "            yyout = stdout;",
  478.   "%+",
  479.   "            yyout = &cout;",
  480.   "%*",
  481.   "",
  482.   "        if ( ! yy_current_buffer )",
  483.   "            yy_current_buffer =",
  484.   "                yy_create_buffer( yyin, YY_BUF_SIZE );",
  485.   "",
  486.   "        yy_load_buffer_state();",
  487.   "        }",
  488.   "",
  489.   "    while ( 1 )        /* loops until end-of-file is reached */",
  490.   "        {",
  491.   "%% yymore()-related code goes here",
  492.   "        yy_cp = yy_c_buf_p;",
  493.   "",
  494.   "        /* Support of yytext. */",
  495.   "        *yy_cp = yy_hold_char;",
  496.   "",
  497.   "        /* yy_bp points to the position in yy_ch_buf of the start of",
  498.   "         * the current run.",
  499.   "         */",
  500.   "        yy_bp = yy_cp;",
  501.   "",
  502.   "%% code to set up and find next match goes here",
  503.   "",
  504.   "yy_find_action:",
  505.   "%% code to find the action number goes here",
  506.   "",
  507.   "        YY_DO_BEFORE_ACTION;",
  508.   "",
  509.   "%% code for yylineno update goes here",
  510.   "",
  511.   "do_action:    /* This label is used only to access EOF actions. */",
  512.   "",
  513.   "%% debug code goes here",
  514.   "",
  515.   "        switch ( yy_act )",
  516.   "    { /* beginning of action switch */",
  517.   "%% actions go here",
  518.   "",
  519.   "    case YY_END_OF_BUFFER:",
  520.   "        {",
  521.   "        /* Amount of text matched not including the EOB char. */",
  522.   "        int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;",
  523.   "",
  524.   "        /* Undo the effects of YY_DO_BEFORE_ACTION. */",
  525.   "        *yy_cp = yy_hold_char;",
  526.   "",
  527.   "        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )",
  528.   "            {",
  529.   "            /* We're scanning a new file or input source.  It's",
  530.   "             * possible that this happened because the user",
  531.   "             * just pointed yyin at a new source and called",
  532.   "             * yylex().  If so, then we have to assure",
  533.   "             * consistency between yy_current_buffer and our",
  534.   "             * globals.  Here is the right place to do so, because",
  535.   "             * this is the first action (other than possibly a",
  536.   "             * back-up) that will match for the new input source.",
  537.   "             */",
  538.   "            yy_n_chars = yy_current_buffer->yy_n_chars;",
  539.   "            yy_current_buffer->yy_input_file = yyin;",
  540.   "            yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;",
  541.   "            }",
  542.   "",
  543.   "        /* Note that here we test for yy_c_buf_p \"<=\" to the position",
  544.   "         * of the first EOB in the buffer, since yy_c_buf_p will",
  545.   "         * already have been incremented past the NUL character",
  546.   "         * (since all states make transitions on EOB to the",
  547.   "         * end-of-buffer state).  Contrast this with the test",
  548.   "         * in input().",
  549.   "         */",
  550.   "        if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
  551.   "            { /* This was really a NUL. */",
  552.   "            yy_state_type yy_next_state;",
  553.   "",
  554.   "            yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;",
  555.   "",
  556.   "            yy_current_state = yy_get_previous_state();",
  557.   "",
  558.   "            /* Okay, we're now positioned to make the NUL",
  559.   "             * transition.  We couldn't have",
  560.   "             * yy_get_previous_state() go ahead and do it",
  561.   "             * for us because it doesn't know how to deal",
  562.   "             * with the possibility of jamming (and we don't",
  563.   "             * want to build jamming into it because then it",
  564.   "             * will run more slowly).",
  565.   "             */",
  566.   "",
  567.   "            yy_next_state = yy_try_NUL_trans( yy_current_state );",
  568.   "",
  569.   "            yy_bp = yytext_ptr + YY_MORE_ADJ;",
  570.   "",
  571.   "            if ( yy_next_state )",
  572.   "                {",
  573.   "                /* Consume the NUL. */",
  574.   "                yy_cp = ++yy_c_buf_p;",
  575.   "                yy_current_state = yy_next_state;",
  576.   "                goto yy_match;",
  577.   "                }",
  578.   "",
  579.   "            else",
  580.   "                {",
  581.   "%% code to do back-up for compressed tables and set up yy_cp goes here",
  582.   "                goto yy_find_action;",
  583.   "                }",
  584.   "            }",
  585.   "",
  586.   "        else switch ( yy_get_next_buffer() )",
  587.   "            {",
  588.   "            case EOB_ACT_END_OF_FILE:",
  589.   "                {",
  590.   "                yy_did_buffer_switch_on_eof = 0;",
  591.   "",
  592.   "                if ( yywrap() )",
  593.   "                    {",
  594.   "                    /* Note: because we've taken care in",
  595.   "                     * yy_get_next_buffer() to have set up",
  596.   "                     * yytext, we can now set up",
  597.   "                     * yy_c_buf_p so that if some total",
  598.   "                     * hoser (like flex itself) wants to",
  599.   "                     * call the scanner after we return the",
  600.   "                     * YY_NULL, it'll still work - another",
  601.   "                     * YY_NULL will get returned.",
  602.   "                     */",
  603.   "                    yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;",
  604.   "",
  605.   "                    yy_act = YY_STATE_EOF(YY_START);",
  606.   "                    goto do_action;",
  607.   "                    }",
  608.   "",
  609.   "                else",
  610.   "                    {",
  611.   "                    if ( ! yy_did_buffer_switch_on_eof )",
  612.   "                        YY_NEW_FILE;",
  613.   "                    }",
  614.   "                break;",
  615.   "                }",
  616.   "",
  617.   "            case EOB_ACT_CONTINUE_SCAN:",
  618.   "                yy_c_buf_p =",
  619.   "                    yytext_ptr + yy_amount_of_matched_text;",
  620.   "",
  621.   "                yy_current_state = yy_get_previous_state();",
  622.   "",
  623.   "                yy_cp = yy_c_buf_p;",
  624.   "                yy_bp = yytext_ptr + YY_MORE_ADJ;",
  625.   "                goto yy_match;",
  626.   "",
  627.   "            case EOB_ACT_LAST_MATCH:",
  628.   "                yy_c_buf_p =",
  629.   "                &yy_current_buffer->yy_ch_buf[yy_n_chars];",
  630.   "",
  631.   "                yy_current_state = yy_get_previous_state();",
  632.   "",
  633.   "                yy_cp = yy_c_buf_p;",
  634.   "                yy_bp = yytext_ptr + YY_MORE_ADJ;",
  635.   "                goto yy_find_action;",
  636.   "            }",
  637.   "        break;",
  638.   "        }",
  639.   "",
  640.   "    default:",
  641.   "        YY_FATAL_ERROR(",
  642.   "            \"fatal flex scanner internal error--no action found\" );",
  643.   "    } /* end of action switch */",
  644.   "        } /* end of scanning one token */",
  645.   "    } /* end of yylex */",
  646.   "",
  647.   "%+",
  648.   "yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )",
  649.   "    {",
  650.   "    yyin = arg_yyin;",
  651.   "    yyout = arg_yyout;",
  652.   "    yy_c_buf_p = 0;",
  653.   "    yy_init = 1;",
  654.   "    yy_start = 0;",
  655.   "    yy_flex_debug = 0;",
  656.   "    yylineno = 1;    // this will only get updated if %option yylineno",
  657.   "",
  658.   "    yy_did_buffer_switch_on_eof = 0;",
  659.   "",
  660.   "    yy_looking_for_trail_begin = 0;",
  661.   "    yy_more_flag = 0;",
  662.   "    yy_more_len = 0;",
  663.   "",
  664.   "    yy_start_stack_ptr = yy_start_stack_depth = 0;",
  665.   "    yy_start_stack = 0;",
  666.   "",
  667.   "    yy_current_buffer = 0;",
  668.   "",
  669.   "#ifdef YY_USES_REJECT",
  670.   "    yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];",
  671.   "#else",
  672.   "    yy_state_buf = 0;",
  673.   "#endif",
  674.   "    }",
  675.   "",
  676.   "yyFlexLexer::~yyFlexLexer()",
  677.   "    {",
  678.   "    delete yy_state_buf;",
  679.   "    yy_delete_buffer( yy_current_buffer );",
  680.   "    }",
  681.   "",
  682.   "void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )",
  683.   "    {",
  684.   "    if ( new_in )",
  685.   "        {",
  686.   "        yy_delete_buffer( yy_current_buffer );",
  687.   "        yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );",
  688.   "        }",
  689.   "",
  690.   "    if ( new_out )",
  691.   "        yyout = new_out;",
  692.   "    }",
  693.   "",
  694.   "#ifdef YY_INTERACTIVE",
  695.   "int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )",
  696.   "#else",
  697.   "int yyFlexLexer::LexerInput( char* buf, int max_size )",
  698.   "#endif",
  699.   "    {",
  700.   "    if ( yyin->eof() || yyin->fail() )",
  701.   "        return 0;",
  702.   "",
  703.   "#ifdef YY_INTERACTIVE",
  704.   "    yyin->get( buf[0] );",
  705.   "",
  706.   "    if ( yyin->eof() )",
  707.   "        return 0;",
  708.   "",
  709.   "    if ( yyin->bad() )",
  710.   "        return -1;",
  711.   "",
  712.   "    return 1;",
  713.   "",
  714.   "#else",
  715.   "    (void) yyin->read( buf, max_size );",
  716.   "",
  717.   "    if ( yyin->bad() )",
  718.   "        return -1;",
  719.   "    else",
  720.   "        return yyin->gcount();",
  721.   "#endif",
  722.   "    }",
  723.   "",
  724.   "void yyFlexLexer::LexerOutput( const char* buf, int size )",
  725.   "    {",
  726.   "    (void) yyout->write( buf, size );",
  727.   "    }",
  728.   "%*",
  729.   "",
  730.   "/* yy_get_next_buffer - try to read in a new buffer",
  731.   " *",
  732.   " * Returns a code representing an action:",
  733.   " *    EOB_ACT_LAST_MATCH -",
  734.   " *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position",
  735.   " *    EOB_ACT_END_OF_FILE - end of file",
  736.   " */",
  737.   "",
  738.   "%-",
  739.   "static int yy_get_next_buffer()",
  740.   "%+",
  741.   "int yyFlexLexer::yy_get_next_buffer()",
  742.   "%*",
  743.   "    {",
  744.   "    register char *dest = yy_current_buffer->yy_ch_buf;",
  745.   "    register char *source = yytext_ptr;",
  746.   "    register int number_to_move, i;",
  747.   "    int ret_val;",
  748.   "",
  749.   "    if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )",
  750.   "        YY_FATAL_ERROR(",
  751.   "        \"fatal flex scanner internal error--end of buffer missed\" );",
  752.   "",
  753.   "    if ( yy_current_buffer->yy_fill_buffer == 0 )",
  754.   "        { /* Don't try to fill the buffer, so this is an EOF. */",
  755.   "        if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )",
  756.   "            {",
  757.   "            /* We matched a singled characater, the EOB, so",
  758.   "             * treat this as a final EOF.",
  759.   "             */",
  760.   "            return EOB_ACT_END_OF_FILE;",
  761.   "            }",
  762.   "",
  763.   "        else",
  764.   "            {",
  765.   "            /* We matched some text prior to the EOB, first",
  766.   "             * process it.",
  767.   "             */",
  768.   "            return EOB_ACT_LAST_MATCH;",
  769.   "            }",
  770.   "        }",
  771.   "",
  772.   "    /* Try to read more data. */",
  773.   "",
  774.   "    /* First move last chars to start of buffer. */",
  775.   "    number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;",
  776.   "",
  777.   "    for ( i = 0; i < number_to_move; ++i )",
  778.   "        *(dest++) = *(source++);",
  779.   "",
  780.   "    if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )",
  781.   "        /* don't do the read, it's not guaranteed to return an EOF,",
  782.   "         * just force an EOF",
  783.   "         */",
  784.   "        yy_n_chars = 0;",
  785.   "",
  786.   "    else",
  787.   "        {",
  788.   "        int num_to_read =",
  789.   "            yy_current_buffer->yy_buf_size - number_to_move - 1;",
  790.   "",
  791.   "        while ( num_to_read <= 0 )",
  792.   "            { /* Not enough room in the buffer - grow it. */",
  793.   "#ifdef YY_USES_REJECT",
  794.   "            YY_FATAL_ERROR(",
  795.   "\"input buffer overflow, can't enlarge buffer because scanner uses REJECT\" );",
  796.   "#else",
  797.   "",
  798.   "            /* just a shorter name for the current buffer */",
  799.   "            YY_BUFFER_STATE b = yy_current_buffer;",
  800.   "",
  801.   "            int yy_c_buf_p_offset =",
  802.   "                (int) (yy_c_buf_p - b->yy_ch_buf);",
  803.   "",
  804.   "            if ( b->yy_is_our_buffer )",
  805.   "                {",
  806.   "                int new_size = b->yy_buf_size * 2;",
  807.   "",
  808.   "                if ( new_size <= 0 )",
  809.   "                    b->yy_buf_size += b->yy_buf_size / 8;",
  810.   "                else",
  811.   "                    b->yy_buf_size *= 2;",
  812.   "",
  813.   "                b->yy_ch_buf = (char *)",
  814.   "                    /* Include room in for 2 EOB chars. */",
  815.   "                    yy_flex_realloc( (void *) b->yy_ch_buf,",
  816.   "                             b->yy_buf_size + 2 );",
  817.   "                }",
  818.   "            else",
  819.   "                /* Can't grow it, we don't own it. */",
  820.   "                b->yy_ch_buf = 0;",
  821.   "",
  822.   "            if ( ! b->yy_ch_buf )",
  823.   "                YY_FATAL_ERROR(",
  824.   "                \"fatal error - scanner input buffer overflow\" );",
  825.   "",
  826.   "            yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];",
  827.   "",
  828.   "            num_to_read = yy_current_buffer->yy_buf_size -",
  829.   "                        number_to_move - 1;",
  830.   "#endif",
  831.   "            }",
  832.   "",
  833.   "        if ( num_to_read > YY_READ_BUF_SIZE )",
  834.   "            num_to_read = YY_READ_BUF_SIZE;",
  835.   "",
  836.   "        /* Read in more data. */",
  837.   "        YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),",
  838.   "            yy_n_chars, num_to_read );",
  839.   "        }",
  840.   "",
  841.   "    if ( yy_n_chars == 0 )",
  842.   "        {",
  843.   "        if ( number_to_move == YY_MORE_ADJ )",
  844.   "            {",
  845.   "            ret_val = EOB_ACT_END_OF_FILE;",
  846.   "            yyrestart( yyin );",
  847.   "            }",
  848.   "",
  849.   "        else",
  850.   "            {",
  851.   "            ret_val = EOB_ACT_LAST_MATCH;",
  852.   "            yy_current_buffer->yy_buffer_status =",
  853.   "                YY_BUFFER_EOF_PENDING;",
  854.   "            }",
  855.   "        }",
  856.   "",
  857.   "    else",
  858.   "        ret_val = EOB_ACT_CONTINUE_SCAN;",
  859.   "",
  860.   "    yy_n_chars += number_to_move;",
  861.   "    yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;",
  862.   "    yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;",
  863.   "",
  864.   "    yytext_ptr = &yy_current_buffer->yy_ch_buf[0];",
  865.   "",
  866.   "    return ret_val;",
  867.   "    }",
  868.   "",
  869.   "",
  870.   "/* yy_get_previous_state - get the state just before the EOB char was reached */",
  871.   "",
  872.   "%-",
  873.   "static yy_state_type yy_get_previous_state()",
  874.   "%+",
  875.   "yy_state_type yyFlexLexer::yy_get_previous_state()",
  876.   "%*",
  877.   "    {",
  878.   "    register yy_state_type yy_current_state;",
  879.   "    register char *yy_cp;",
  880.   "",
  881.   "%% code to get the start state into yy_current_state goes here",
  882.   "",
  883.   "    for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )",
  884.   "        {",
  885.   "%% code to find the next state goes here",
  886.   "        }",
  887.   "",
  888.   "    return yy_current_state;",
  889.   "    }",
  890.   "",
  891.   "",
  892.   "/* yy_try_NUL_trans - try to make a transition on the NUL character",
  893.   " *",
  894.   " * synopsis",
  895.   " *    next_state = yy_try_NUL_trans( current_state );",
  896.   " */",
  897.   "",
  898.   "%-",
  899.   "#ifdef YY_USE_PROTOS",
  900.   "static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )",
  901.   "#else",
  902.   "static yy_state_type yy_try_NUL_trans( yy_current_state )",
  903.   "yy_state_type yy_current_state;",
  904.   "#endif",
  905.   "%+",
  906.   "yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )",
  907.   "%*",
  908.   "    {",
  909.   "    register int yy_is_jam;",
  910.   "%% code to find the next state, and perhaps do backing up, goes here",
  911.   "",
  912.   "    return yy_is_jam ? 0 : yy_current_state;",
  913.   "    }",
  914.   "",
  915.   "",
  916.   "%-",
  917.   "#ifndef YY_NO_UNPUT",
  918.   "#ifdef YY_USE_PROTOS",
  919.   "static void yyunput( int c, register char *yy_bp )",
  920.   "#else",
  921.   "static void yyunput( c, yy_bp )",
  922.   "int c;",
  923.   "register char *yy_bp;",
  924.   "#endif",
  925.   "%+",
  926.   "void yyFlexLexer::yyunput( int c, register char* yy_bp )",
  927.   "%*",
  928.   "    {",
  929.   "    register char *yy_cp = yy_c_buf_p;",
  930.   "",
  931.   "    /* undo effects of setting up yytext */",
  932.   "    *yy_cp = yy_hold_char;",
  933.   "",
  934.   "    if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
  935.   "        { /* need to shift things up to make room */",
  936.   "        /* +2 for EOB chars. */",
  937.   "        register int number_to_move = yy_n_chars + 2;",
  938.   "        register char *dest = &yy_current_buffer->yy_ch_buf[",
  939.   "                    yy_current_buffer->yy_buf_size + 2];",
  940.   "        register char *source =",
  941.   "                &yy_current_buffer->yy_ch_buf[number_to_move];",
  942.   "",
  943.   "        while ( source > yy_current_buffer->yy_ch_buf )",
  944.   "            *--dest = *--source;",
  945.   "",
  946.   "        yy_cp += (int) (dest - source);",
  947.   "        yy_bp += (int) (dest - source);",
  948.   "        yy_n_chars = yy_current_buffer->yy_buf_size;",
  949.   "",
  950.   "        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
  951.   "            YY_FATAL_ERROR( \"flex scanner push-back overflow\" );",
  952.   "        }",
  953.   "",
  954.   "    *--yy_cp = (char) c;",
  955.   "",
  956.   "%% update yylineno here",
  957.   "",
  958.   "    yytext_ptr = yy_bp;",
  959.   "    yy_hold_char = *yy_cp;",
  960.   "    yy_c_buf_p = yy_cp;",
  961.   "    }",
  962.   "%-",
  963.   "#endif    /* ifndef YY_NO_UNPUT */",
  964.   "%*",
  965.   "",
  966.   "",
  967.   "%-",
  968.   "#ifdef __cplusplus",
  969.   "static int yyinput()",
  970.   "#else",
  971.   "static int input()",
  972.   "#endif",
  973.   "%+",
  974.   "int yyFlexLexer::yyinput()",
  975.   "%*",
  976.   "    {",
  977.   "    int c;",
  978.   "",
  979.   "    *yy_c_buf_p = yy_hold_char;",
  980.   "",
  981.   "    if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )",
  982.   "        {",
  983.   "        /* yy_c_buf_p now points to the character we want to return.",
  984.   "         * If this occurs *before* the EOB characters, then it's a",
  985.   "         * valid NUL; if not, then we've hit the end of the buffer.",
  986.   "         */",
  987.   "        if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
  988.   "            /* This was really a NUL. */",
  989.   "            *yy_c_buf_p = '\\0';",
  990.   "",
  991.   "        else",
  992.   "            { /* need more input */",
  993.   "            yytext_ptr = yy_c_buf_p;",
  994.   "            ++yy_c_buf_p;",
  995.   "",
  996.   "            switch ( yy_get_next_buffer() )",
  997.   "                {",
  998.   "                case EOB_ACT_END_OF_FILE:",
  999.   "                    {",
  1000.   "                    if ( yywrap() )",
  1001.   "                        {",
  1002.   "                        yy_c_buf_p =",
  1003.   "                        yytext_ptr + YY_MORE_ADJ;",
  1004.   "                        return EOF;",
  1005.   "                        }",
  1006.   "",
  1007.   "                    if ( ! yy_did_buffer_switch_on_eof )",
  1008.   "                        YY_NEW_FILE;",
  1009.   "#ifdef __cplusplus",
  1010.   "                    return yyinput();",
  1011.   "#else",
  1012.   "                    return input();",
  1013.   "#endif",
  1014.   "                    }",
  1015.   "",
  1016.   "                case EOB_ACT_CONTINUE_SCAN:",
  1017.   "                    yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;",
  1018.   "                    break;",
  1019.   "",
  1020.   "                case EOB_ACT_LAST_MATCH:",
  1021.   "#ifdef __cplusplus",
  1022.   "                    YY_FATAL_ERROR(",
  1023.   "                    \"unexpected last match in yyinput()\" );",
  1024.   "#else",
  1025.   "                    YY_FATAL_ERROR(",
  1026.   "                    \"unexpected last match in input()\" );",
  1027.   "#endif",
  1028.   "                }",
  1029.   "            }",
  1030.   "        }",
  1031.   "",
  1032.   "    c = *(unsigned char *) yy_c_buf_p;    /* cast for 8-bit char's */",
  1033.   "    *yy_c_buf_p = '\\0';    /* preserve yytext */",
  1034.   "    yy_hold_char = *++yy_c_buf_p;",
  1035.   "",
  1036.   "%% update BOL and yylineno",
  1037.   "",
  1038.   "    return c;",
  1039.   "    }",
  1040.   "",
  1041.   "",
  1042.   "%-",
  1043.   "#ifdef YY_USE_PROTOS",
  1044.   "void yyrestart( FILE *input_file )",
  1045.   "#else",
  1046.   "void yyrestart( input_file )",
  1047.   "FILE *input_file;",
  1048.   "#endif",
  1049.   "%+",
  1050.   "void yyFlexLexer::yyrestart( istream* input_file )",
  1051.   "%*",
  1052.   "    {",
  1053.   "    if ( ! yy_current_buffer )",
  1054.   "        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );",
  1055.   "",
  1056.   "    yy_init_buffer( yy_current_buffer, input_file );",
  1057.   "    yy_load_buffer_state();",
  1058.   "    }",
  1059.   "",
  1060.   "",
  1061.   "%-",
  1062.   "#ifdef YY_USE_PROTOS",
  1063.   "void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
  1064.   "#else",
  1065.   "void yy_switch_to_buffer( new_buffer )",
  1066.   "YY_BUFFER_STATE new_buffer;",
  1067.   "#endif",
  1068.   "%+",
  1069.   "void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
  1070.   "%*",
  1071.   "    {",
  1072.   "    if ( yy_current_buffer == new_buffer )",
  1073.   "        return;",
  1074.   "",
  1075.   "    if ( yy_current_buffer )",
  1076.   "        {",
  1077.   "        /* Flush out information for old buffer. */",
  1078.   "        *yy_c_buf_p = yy_hold_char;",
  1079.   "        yy_current_buffer->yy_buf_pos = yy_c_buf_p;",
  1080.   "        yy_current_buffer->yy_n_chars = yy_n_chars;",
  1081.   "        }",
  1082.   "",
  1083.   "    yy_current_buffer = new_buffer;",
  1084.   "    yy_load_buffer_state();",
  1085.   "",
  1086.   "    /* We don't actually know whether we did this switch during",
  1087.   "     * EOF (yywrap()) processing, but the only time this flag",
  1088.   "     * is looked at is after yywrap() is called, so it's safe",
  1089.   "     * to go ahead and always set it.",
  1090.   "     */",
  1091.   "    yy_did_buffer_switch_on_eof = 1;",
  1092.   "    }",
  1093.   "",
  1094.   "",
  1095.   "%-",
  1096.   "#ifdef YY_USE_PROTOS",
  1097.   "void yy_load_buffer_state( void )",
  1098.   "#else",
  1099.   "void yy_load_buffer_state()",
  1100.   "#endif",
  1101.   "%+",
  1102.   "void yyFlexLexer::yy_load_buffer_state()",
  1103.   "%*",
  1104.   "    {",
  1105.   "    yy_n_chars = yy_current_buffer->yy_n_chars;",
  1106.   "    yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;",
  1107.   "    yyin = yy_current_buffer->yy_input_file;",
  1108.   "    yy_hold_char = *yy_c_buf_p;",
  1109.   "    }",
  1110.   "",
  1111.   "",
  1112.   "%-",
  1113.   "#ifdef YY_USE_PROTOS",
  1114.   "YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )",
  1115.   "#else",
  1116.   "YY_BUFFER_STATE yy_create_buffer( file, size )",
  1117.   "FILE *file;",
  1118.   "int size;",
  1119.   "#endif",
  1120.   "%+",
  1121.   "YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )",
  1122.   "%*",
  1123.   "    {",
  1124.   "    YY_BUFFER_STATE b;",
  1125.   "",
  1126.   "    b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );",
  1127.   "    if ( ! b )",
  1128.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
  1129.   "",
  1130.   "    b->yy_buf_size = size;",
  1131.   "",
  1132.   "    /* yy_ch_buf has to be 2 characters longer than the size given because",
  1133.   "     * we need to put in 2 end-of-buffer characters.",
  1134.   "     */",
  1135.   "    b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );",
  1136.   "    if ( ! b->yy_ch_buf )",
  1137.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
  1138.   "",
  1139.   "    b->yy_is_our_buffer = 1;",
  1140.   "",
  1141.   "    yy_init_buffer( b, file );",
  1142.   "",
  1143.   "    return b;",
  1144.   "    }",
  1145.   "",
  1146.   "",
  1147.   "%-",
  1148.   "#ifdef YY_USE_PROTOS",
  1149.   "void yy_delete_buffer( YY_BUFFER_STATE b )",
  1150.   "#else",
  1151.   "void yy_delete_buffer( b )",
  1152.   "YY_BUFFER_STATE b;",
  1153.   "#endif",
  1154.   "%+",
  1155.   "void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )",
  1156.   "%*",
  1157.   "    {",
  1158.   "    if ( ! b )",
  1159.   "        return;",
  1160.   "",
  1161.   "    if ( b == yy_current_buffer )",
  1162.   "        yy_current_buffer = (YY_BUFFER_STATE) 0;",
  1163.   "",
  1164.   "    if ( b->yy_is_our_buffer )",
  1165.   "        yy_flex_free( (void *) b->yy_ch_buf );",
  1166.   "",
  1167.   "    yy_flex_free( (void *) b );",
  1168.   "    }",
  1169.   "",
  1170.   "",
  1171.   "%-",
  1172.   "#ifndef YY_ALWAYS_INTERACTIVE",
  1173.   "#ifndef YY_NEVER_INTERACTIVE",
  1174.   "extern int isatty YY_PROTO(( int ));",
  1175.   "#endif",
  1176.   "#endif",
  1177.   "",
  1178.   "#ifdef YY_USE_PROTOS",
  1179.   "void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )",
  1180.   "#else",
  1181.   "void yy_init_buffer( b, file )",
  1182.   "YY_BUFFER_STATE b;",
  1183.   "FILE *file;",
  1184.   "#endif",
  1185.   "",
  1186.   "%+",
  1187.   "extern \"C\" int isatty YY_PROTO(( int ));",
  1188.   "void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )",
  1189.   "%*",
  1190.   "",
  1191.   "    {",
  1192.   "    yy_flush_buffer( b );",
  1193.   "",
  1194.   "    b->yy_input_file = file;",
  1195.   "    b->yy_fill_buffer = 1;",
  1196.   "",
  1197.   "%-",
  1198.   "#if YY_ALWAYS_INTERACTIVE",
  1199.   "    b->yy_is_interactive = 1;",
  1200.   "#else",
  1201.   "#if YY_NEVER_INTERACTIVE",
  1202.   "    b->yy_is_interactive = 0;",
  1203.   "#else",
  1204.   "    b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;",
  1205.   "#endif",
  1206.   "#endif",
  1207.   "%+",
  1208.   "    b->yy_is_interactive = 0;",
  1209.   "%*",
  1210.   "    }",
  1211.   "",
  1212.   "",
  1213.   "%-",
  1214.   "#ifdef YY_USE_PROTOS",
  1215.   "void yy_flush_buffer( YY_BUFFER_STATE b )",
  1216.   "#else",
  1217.   "void yy_flush_buffer( b )",
  1218.   "YY_BUFFER_STATE b;",
  1219.   "#endif",
  1220.   "",
  1221.   "%+",
  1222.   "void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )",
  1223.   "%*",
  1224.   "    {",
  1225.   "    b->yy_n_chars = 0;",
  1226.   "",
  1227.   "    /* We always need two end-of-buffer characters.  The first causes",
  1228.   "     * a transition to the end-of-buffer state.  The second causes",
  1229.   "     * a jam in that state.",
  1230.   "     */",
  1231.   "    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;",
  1232.   "    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;",
  1233.   "",
  1234.   "    b->yy_buf_pos = &b->yy_ch_buf[0];",
  1235.   "",
  1236.   "    b->yy_at_bol = 1;",
  1237.   "    b->yy_buffer_status = YY_BUFFER_NEW;",
  1238.   "",
  1239.   "    if ( b == yy_current_buffer )",
  1240.   "        yy_load_buffer_state();",
  1241.   "    }",
  1242.   "%*",
  1243.   "",
  1244.   "",
  1245.   "#ifndef YY_NO_SCAN_BUFFER",
  1246.   "%-",
  1247.   "#ifdef YY_USE_PROTOS",
  1248.   "YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )",
  1249.   "#else",
  1250.   "YY_BUFFER_STATE yy_scan_buffer( base, size )",
  1251.   "char *base;",
  1252.   "yy_size_t size;",
  1253.   "#endif",
  1254.   "    {",
  1255.   "    YY_BUFFER_STATE b;",
  1256.   "",
  1257.   "    if ( size < 2 ||",
  1258.   "         base[size-2] != YY_END_OF_BUFFER_CHAR ||",
  1259.   "         base[size-1] != YY_END_OF_BUFFER_CHAR )",
  1260.   "        /* They forgot to leave room for the EOB's. */",
  1261.   "        return 0;",
  1262.   "",
  1263.   "    b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );",
  1264.   "    if ( ! b )",
  1265.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_buffer()\" );",
  1266.   "",
  1267.   "    b->yy_buf_size = size - 2;    /* \"- 2\" to take care of EOB's */",
  1268.   "    b->yy_buf_pos = b->yy_ch_buf = base;",
  1269.   "    b->yy_is_our_buffer = 0;",
  1270.   "    b->yy_input_file = 0;",
  1271.   "    b->yy_n_chars = b->yy_buf_size;",
  1272.   "    b->yy_is_interactive = 0;",
  1273.   "    b->yy_at_bol = 1;",
  1274.   "    b->yy_fill_buffer = 0;",
  1275.   "    b->yy_buffer_status = YY_BUFFER_NEW;",
  1276.   "",
  1277.   "    yy_switch_to_buffer( b );",
  1278.   "",
  1279.   "    return b;",
  1280.   "    }",
  1281.   "%*",
  1282.   "#endif",
  1283.   "",
  1284.   "",
  1285.   "#ifndef YY_NO_SCAN_STRING",
  1286.   "%-",
  1287.   "#ifdef YY_USE_PROTOS",
  1288.   "YY_BUFFER_STATE yy_scan_string( yyconst char *str )",
  1289.   "#else",
  1290.   "YY_BUFFER_STATE yy_scan_string( str )",
  1291.   "yyconst char *str;",
  1292.   "#endif",
  1293.   "    {",
  1294.   "    int len;",
  1295.   "    for ( len = 0; str[len]; ++len )",
  1296.   "        ;",
  1297.   "",
  1298.   "    return yy_scan_bytes( str, len );",
  1299.   "    }",
  1300.   "%*",
  1301.   "#endif",
  1302.   "",
  1303.   "",
  1304.   "#ifndef YY_NO_SCAN_BYTES",
  1305.   "%-",
  1306.   "#ifdef YY_USE_PROTOS",
  1307.   "YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )",
  1308.   "#else",
  1309.   "YY_BUFFER_STATE yy_scan_bytes( bytes, len )",
  1310.   "yyconst char *bytes;",
  1311.   "int len;",
  1312.   "#endif",
  1313.   "    {",
  1314.   "    YY_BUFFER_STATE b;",
  1315.   "    char *buf;",
  1316.   "    yy_size_t n;",
  1317.   "    int i;",
  1318.   "",
  1319.   "    /* Get memory for full buffer, including space for trailing EOB's. */",
  1320.   "    n = len + 2;",
  1321.   "    buf = (char *) yy_flex_alloc( n );",
  1322.   "    if ( ! buf )",
  1323.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_bytes()\" );",
  1324.   "",
  1325.   "    for ( i = 0; i < len; ++i )",
  1326.   "        buf[i] = bytes[i];",
  1327.   "",
  1328.   "    buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;",
  1329.   "",
  1330.   "    b = yy_scan_buffer( buf, n );",
  1331.   "    if ( ! b )",
  1332.   "        YY_FATAL_ERROR( \"bad buffer in yy_scan_bytes()\" );",
  1333.   "",
  1334.   "    /* It's okay to grow etc. this buffer, and we should throw it",
  1335.   "     * away when we're done.",
  1336.   "     */",
  1337.   "    b->yy_is_our_buffer = 1;",
  1338.   "",
  1339.   "    return b;",
  1340.   "    }",
  1341.   "%*",
  1342.   "#endif",
  1343.   "",
  1344.   "",
  1345.   "#ifndef YY_NO_PUSH_STATE",
  1346.   "%-",
  1347.   "#ifdef YY_USE_PROTOS",
  1348.   "static void yy_push_state( int new_state )",
  1349.   "#else",
  1350.   "static void yy_push_state( new_state )",
  1351.   "int new_state;",
  1352.   "#endif",
  1353.   "%+",
  1354.   "void yyFlexLexer::yy_push_state( int new_state )",
  1355.   "%*",
  1356.   "    {",
  1357.   "    if ( yy_start_stack_ptr >= yy_start_stack_depth )",
  1358.   "        {",
  1359.   "        yy_size_t new_size;",
  1360.   "",
  1361.   "        yy_start_stack_depth += YY_START_STACK_INCR;",
  1362.   "        new_size = yy_start_stack_depth * sizeof( int );",
  1363.   "",
  1364.   "        if ( ! yy_start_stack )",
  1365.   "            yy_start_stack = (int *) yy_flex_alloc( new_size );",
  1366.   "",
  1367.   "        else",
  1368.   "            yy_start_stack = (int *) yy_flex_realloc(",
  1369.   "                    (void *) yy_start_stack, new_size );",
  1370.   "",
  1371.   "        if ( ! yy_start_stack )",
  1372.   "            YY_FATAL_ERROR(",
  1373.   "            \"out of memory expanding start-condition stack\" );",
  1374.   "        }",
  1375.   "",
  1376.   "    yy_start_stack[yy_start_stack_ptr++] = YY_START;",
  1377.   "",
  1378.   "    BEGIN(new_state);",
  1379.   "    }",
  1380.   "#endif",
  1381.   "",
  1382.   "",
  1383.   "#ifndef YY_NO_POP_STATE",
  1384.   "%-",
  1385.   "static void yy_pop_state()",
  1386.   "%+",
  1387.   "void yyFlexLexer::yy_pop_state()",
  1388.   "%*",
  1389.   "    {",
  1390.   "    if ( --yy_start_stack_ptr < 0 )",
  1391.   "        YY_FATAL_ERROR( \"start-condition stack underflow\" );",
  1392.   "",
  1393.   "    BEGIN(yy_start_stack[yy_start_stack_ptr]);",
  1394.   "    }",
  1395.   "#endif",
  1396.   "",
  1397.   "",
  1398.   "#ifndef YY_NO_TOP_STATE",
  1399.   "%-",
  1400.   "static int yy_top_state()",
  1401.   "%+",
  1402.   "int yyFlexLexer::yy_top_state()",
  1403.   "%*",
  1404.   "    {",
  1405.   "    return yy_start_stack[yy_start_stack_ptr - 1];",
  1406.   "    }",
  1407.   "#endif",
  1408.   "",
  1409.   "#ifndef YY_EXIT_FAILURE",
  1410.   "#define YY_EXIT_FAILURE 2",
  1411.   "#endif",
  1412.   "",
  1413.   "%-",
  1414.   "#ifdef YY_USE_PROTOS",
  1415.   "static void yy_fatal_error( yyconst char msg[] )",
  1416.   "#else",
  1417.   "static void yy_fatal_error( msg )",
  1418.   "char msg[];",
  1419.   "#endif",
  1420.   "    {",
  1421.   "    (void) fprintf( stderr, \"%s\\n\", msg );",
  1422.   "    exit( YY_EXIT_FAILURE );",
  1423.   "    }",
  1424.   "",
  1425.   "%+",
  1426.   "",
  1427.   "void yyFlexLexer::LexerError( yyconst char msg[] )",
  1428.   "    {",
  1429.   "    cerr << msg << '\\n';",
  1430.   "    exit( YY_EXIT_FAILURE );",
  1431.   "    }",
  1432.   "%*",
  1433.   "",
  1434.   "",
  1435.   "/* Redefine yyless() so it works in section 3 code. */",
  1436.   "",
  1437.   "#undef yyless",
  1438.   "#define yyless(n) \\",
  1439.   "    do \\",
  1440.   "        { \\",
  1441.   "        /* Undo effects of setting up yytext. */ \\",
  1442.   "        yytext[yyleng] = yy_hold_char; \\",
  1443.   "        yy_c_buf_p = yytext + n - YY_MORE_ADJ; \\",
  1444.   "        yy_hold_char = *yy_c_buf_p; \\",
  1445.   "        *yy_c_buf_p = '\\0'; \\",
  1446.   "        yyleng = n; \\",
  1447.   "        } \\",
  1448.   "    while ( 0 )",
  1449.   "",
  1450.   "",
  1451.   "/* Internal utility routines. */",
  1452.   "",
  1453.   "#ifndef yytext_ptr",
  1454.   "#ifdef YY_USE_PROTOS",
  1455.   "static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )",
  1456.   "#else",
  1457.   "static void yy_flex_strncpy( s1, s2, n )",
  1458.   "char *s1;",
  1459.   "yyconst char *s2;",
  1460.   "int n;",
  1461.   "#endif",
  1462.   "    {",
  1463.   "    register int i;",
  1464.   "    for ( i = 0; i < n; ++i )",
  1465.   "        s1[i] = s2[i];",
  1466.   "    }",
  1467.   "#endif",
  1468.   "",
  1469.   "",
  1470.   "#ifdef YY_USE_PROTOS",
  1471.   "static void *yy_flex_alloc( yy_size_t size )",
  1472.   "#else",
  1473.   "static void *yy_flex_alloc( size )",
  1474.   "yy_size_t size;",
  1475.   "#endif",
  1476.   "    {",
  1477.   "    return (void *) malloc( size );",
  1478.   "    }",
  1479.   "",
  1480.   "#ifdef YY_USE_PROTOS",
  1481.   "static void *yy_flex_realloc( void *ptr, yy_size_t size )",
  1482.   "#else",
  1483.   "static void *yy_flex_realloc( ptr, size )",
  1484.   "void *ptr;",
  1485.   "yy_size_t size;",
  1486.   "#endif",
  1487.   "    {",
  1488.   "    /* The cast to (char *) in the following accommodates both",
  1489.   "     * implementations that use char* generic pointers, and those",
  1490.   "     * that use void* generic pointers.  It works with the latter",
  1491.   "     * because both ANSI C and C++ allow castless assignment from",
  1492.   "     * any pointer type to void*, and deal with argument conversions",
  1493.   "     * as though doing an assignment.",
  1494.   "     */",
  1495.   "    return (void *) realloc( (char *) ptr, size );",
  1496.   "    }",
  1497.   "",
  1498.   "#ifdef YY_USE_PROTOS",
  1499.   "static void yy_flex_free( void *ptr )",
  1500.   "#else",
  1501.   "static void yy_flex_free( ptr )",
  1502.   "void *ptr;",
  1503.   "#endif",
  1504.   "    {",
  1505.   "    free( ptr );",
  1506.   "    }",
  1507.   "",
  1508.   "#if YY_MAIN",
  1509.   "int main()",
  1510.   "    {",
  1511.   "    yylex();",
  1512.   "    return 0;",
  1513.   "    }",
  1514.   "#endif",
  1515.   0
  1516. };
  1517.